<?php defined('NABU') || exit ?>

<h1><?= $head_title ?></h1>

<?php require_once 'views/layouts/messages.php' ?>

<form method="post" action="<?= NABU_ROUTES['post'] ?>" enctype="multipart/form-data">
  <input type="hidden" name="csrf" value="<?= $token ?>">
  <div>
    <label for="title"><b>Título del artículo</b></label>
  </div>
  <div>
    <input type="text" id="title" name="title" minlength="1" maxlength="246" size="107" required>
  </div>
  <div>
    <label for="synopsis"><b>Resumen del artículo</b></label>
  </div>
  <div>
    <textarea type="text" id="synopsis" name="synopsis" minlength="1" maxlength="255" rows="3" cols="100" required></textarea>
  </div>
  <div>
    <label for="content"><b>Contenido del artículo (<a href="https://www.markdownguide.org/basic-syntax/" target="_blank">formato Markdown</a>)</b></label>
  </div>
  <div>
    <textarea type="text" id="content" name="content" minlength="1" maxlength="<?= NABU_DEFAULT['article_size'] ?>" rows="32" cols="100" required></textarea>
  </div>
  <div>
    <input type="submit" name="post_submit" value="Enviar">
  </div>
</form>
